package com.hzau.tourist_service_sys.comtroller;

import com.baomidou.mybatisplus.core.conditions.query.LambdaQueryWrapper;
import com.hzau.tourist_service_sys.dao.FoodRelax.PerformanceDao;
import com.hzau.tourist_service_sys.pojo.FoodRelax.FoodRelax;
import com.hzau.tourist_service_sys.pojo.FoodRelax.Performance;
import com.hzau.tourist_service_sys.result.Result;
import com.hzau.tourist_service_sys.service.FoodRelaxService;
import org.apache.ibatis.annotations.Mapper;
import org.apache.ibatis.jdbc.Null;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.*;

@RestController
public class FoodRelaxController {
    @Autowired
    FoodRelaxService foodRelaxService;

    @GetMapping("/relax/selectAll/{pageNum}")
    public Result selectAll(@PathVariable int pagenum) {
        return foodRelaxService.selectAll(pagenum);
    }

    @GetMapping("/relax/selectRelaxDetail/{frId}")
    public Result selectRelaxDetail(@PathVariable long frId){
        return foodRelaxService.selectRelaxDetail(frId);
    }
    @PostMapping("/relax/queryRelax")
    public  Result queryRelax(@RequestBody FoodRelax foodRelax){

        return foodRelaxService.qureyRelax(foodRelax);
    }
    @GetMapping("performance/selectAllPerformace/{pagenum}")
    public  Result selectAllPerformace(@PathVariable int pagenum){
        return foodRelaxService.selectAllPerformace(pagenum);
    }
    @GetMapping("performance/selectPerformaceDetail/{pfId}")
    public Result selectPerformaceDetail(@PathVariable long pfId){
        return foodRelaxService.selectPerformaceDetail(pfId);

    }
    @PostMapping("/performance/queryPerformance")
    public  Result queryPerformance(@RequestBody Performance performance){

return  foodRelaxService.queryPerformance(performance);
    }
}